/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package assign2;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;

/**
 *
 * @author martyastiadi
 */


class AddInven implements ActionListener {
    //JFrame frame;
    JFrame frame = new JFrame();
    
    public void actionPerformed(ActionEvent a) {
//        JTextArea text = new JTextArea(20, 10);
         String sinv = (String)JOptionPane.showInputDialog(frame,"Type new product:\n","Inventory",JOptionPane.PLAIN_MESSAGE, null, null, "Product ") ;
         String sinv1 = (String)JOptionPane.showInputDialog(frame,"Type new product:\n","Inventory",JOptionPane.PLAIN_MESSAGE, null, null, "Product ");
//        String ans;
//        ans = JOptionPane.showInputDialog(null, "Speed in miles per hour?");
//       text.setText(sinv);
//       text.setText(sinv1);
//       frame.add(text);

    }
}


class AddProd implements ActionListener {
    JFrame frame;
    public void actionPerformed(ActionEvent a) {
//        JOptionPane.showMessageDialog(frame,"Eggs are not supposed to be green.","Message");
//         String spro = (String)JOptionPane.showInputDialog(frame,"Type new product:\n","Product",JOptionPane.PLAIN_MESSAGE, null, null, "Product ");
Object complexMsg[] = { "Product", "Item" };
//Object complexMsg2[] = { "Product" };
    JOptionPane optionPane = new JOptionPane();
        String // <editor-fold defaultstate="collapsed" desc="complexMsg">
                showInputDialog// </editor-fold>
 = JOptionPane.showInputDialog(complexMsg);

   // optionPane.setMessageType(JOptionPane.INFORMATION_MESSAGE);
    //JDialog dialog = optionPane.createDialog(null, "Width 100");
    //dialog.setVisible(true);

    }


}
